package org.lboot.idmo.custom.device;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.lboot.jpa.entity.LongBaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "fd_device", uniqueConstraints = {@UniqueConstraint(columnNames = {"device_id", "user_id"})})
@ApiModel(value = "设备绑定关系",description = "用户与设备绑定关系")
public class FdDevice extends LongBaseEntity implements Serializable {

    @ApiModelProperty(value = "设备ID")
    @Column(name = "device_id")
    String deviceId;

    @ApiModelProperty(value = "用户ID")
    @Column(name = "user_id")
    Long userId;

}
